<?php

function printAdminMessage() {
    echo '<div id="annonce">
    		Bienvenue aux administrateurs, veuillez vous connecter !
			</div>';
}

function view_connexion_wrong_ids() {
    return '
    <div id="annonce">L\'identifiant ou le mot de passe n\'est pas valide, Veuillez r&eacuteessayer !</div>
        
    <form id="connexion" action="' . URL_ROOT . 'admin" method="POST">
				
					<div class="left">
						<label style="display: block;" for="email" >Pseudo</label>
						<input style="display: block;" type="text" id="email" name="email">
					</div>
					
					<div class="left">
						<label style="display: block;" for="password">Password</label>
						<input style="display: block;" type="password" id="password" name="password">
					</div>
					
					<div class="left">
						<label style="display: block;" for="password">&nbsp;</label>
						<button type="submit" id="connexion_button">login</button>
					</div>
					
					<div class="clear"></div>
			</form>';
}

function view_not_connexion_form() {
    return
            '<form id="connexion" action="' . URL_ROOT . 'admin" method="POST">
				
					<div class="left">
						<label style="display: block;" for="email" >Pseudo</label>
						<input style="display: block;" type="text" id="email" name="email">
					</div>
					
					<div class="left">
						<label style="display: block;" for="password">Password</label>
						<input style="display: block;" type="password" id="password" name="password">
					</div>
					
					<div class="left">
						<label style="display: block;" for="password">&nbsp;</label>
						<button type="submit" id="connexion_button">login</button>
					</div>
					
					<div class="clear"></div>
			</form>';
}

function view_connexion_greeting() {

    echo'
            <div id="annonce">
                    Bienvenue administrateur, change le site comme bon te semble grace à ce petit backoffice !
            </div>
            
            <div id="pannel_control">
                <div id="annonce">
                        Espace création
                </div>
                    <a href="' . URL_ROOT . 'create-playlist"><div id="control_link">Creer une playlist</div></a>
                    <a href="' . URL_ROOT . 'create-admin"><div id="control_link">Creer un admin</div></a>

                <div id="annonce">
                        Espace modification
                </div>
                    <a href="' . URL_ROOT . 'playlist-view"><div id="control_link">Gerer les playlists</div></a>
                    <a href="' . URL_ROOT . 'user-view"><div id="control_link">Gerer les utilisateurs</div></a>
                <div id="annonce">
                        Aide
                </div>    
                    <a href="' . URL_ROOT . 'user-view"><div id="control_link">Mode d\'emploi</div></a>
            </div>
        ';
    
}

?>
